/* 
 * File:   BMPHeader.h
 * Author: mm021791
 *
 * Created on 3 de octubre de 2012, 09:43
 */

#ifndef BMPHEADER_H
#define	BMPHEADER_H

#include <iostream>
#include <fstream>
using namespace std;

namespace TP{ namespace Grafica { namespace Renderizado {

    class BMPHeader {
        
    public:
        
        BMPHeader ();
        
        BMPHeader       
        (
            unsigned short int type,
            long  size,
            unsigned short int reserve1,
            unsigned short int reserve2,
            long offBits,                     
            long bmpSize,
            long bmpWidth,
            long bmpHeight,
            unsigned short int bmpPlanes,
            unsigned short int bmpBitCount,  
            long bmpCompression,
            long bmpSizeImage,
            long bmpXPelsPerMeter,
            long bmpYPelsPerMeter,
            long bmpClrUsed,
            long bmpClrImportant             
        );
        
        virtual ~BMPHeader();
        
        friend ostream& operator<<(ostream &stream, const BMPHeader& header);
        friend istream& operator>>(istream &stream, BMPHeader &header);
        
        unsigned short int GetBmpBitCount() const {
            return bmpBitCount;
        }

        void SetBmpBitCount(unsigned short int bmpBitCount) {
            this->bmpBitCount = bmpBitCount;
        }

        long GetBmpClrImportant() const {
            return bmpClrImportant;
        }

        void SetBmpClrImportant(long bmpClrImportant) {
            this->bmpClrImportant = bmpClrImportant;
        }

        long GetBmpClrUsed() const {
            return bmpClrUsed;
        }

        void SetBmpClrUsed(long bmpClrUsed) {
            this->bmpClrUsed = bmpClrUsed;
        }

        long GetBmpCompression() const {
            return bmpCompression;
        }

        void SetBmpCompression(long bmpCompression) {
            this->bmpCompression = bmpCompression;
        }

        long GetBmpHeight() const {
            return bmpHeight;
        }

        void SetBmpHeight(long bmpHeight) {
            this->bmpHeight = bmpHeight;
        }

        unsigned short int GetBmpPlanes() const {
            return bmpPlanes;
        }

        void SetBmpPlanes(unsigned short int bmpPlanes) {
            this->bmpPlanes = bmpPlanes;
        }

        long GetBmpSize() const {
            return bmpSize;
        }

        void SetBmpSize(long bmpSize) {
            this->bmpSize = bmpSize;
        }

        long GetBmpSizeImage() const {
            return bmpSizeImage;
        }

        void SetBmpSizeImage(long bmpSizeImage) {
            this->bmpSizeImage = bmpSizeImage;
        }

        long GetBmpWidth() const {
            return bmpWidth;
        }

        void SetBmpWidth(long bmpWidth) {
            this->bmpWidth = bmpWidth;
        }

        long GetBmpXPelsPerMeter() const {
            return bmpXPelsPerMeter;
        }

        void SetBmpXPelsPerMeter(long bmpXPelsPerMeter) {
            this->bmpXPelsPerMeter = bmpXPelsPerMeter;
        }

        long GetBmpYPelsPerMeter() const {
            return bmpYPelsPerMeter;
        }

        void SetBmpYPelsPerMeter(long bmpYPelsPerMeter) {
            this->bmpYPelsPerMeter = bmpYPelsPerMeter;
        }

        long GetOffBits() const {
            return offBits;
        }

        void SetOffBits(long offBits) {
            this->offBits = offBits;
        }

        unsigned short int GetReserve1() const {
            return reserve1;
        }

        void SetReserve1(unsigned short int reserve1) {
            this->reserve1 = reserve1;
        }

        unsigned short int GetReserve2() const {
            return reserve2;
        }

        void SetReserve2(unsigned short int reserve2) {
            this->reserve2 = reserve2;
        }

        long GetSize() const {
            return size;
        }

        void SetSize(long size) {
            this->size = size;
        }

        unsigned short int GetType() const {
            return type;
        }

        void SetType(unsigned short int type) {
            this->type = type;
        }
        
    private:
    
        // File header.
        unsigned short int type;
        long  size;
        unsigned short int reserve1;
        unsigned short int reserve2;
        long offBits;                     

        // BMP Header.
        long bmpSize;
        long bmpWidth;
        long bmpHeight;
        unsigned short int bmpPlanes;
        unsigned short int bmpBitCount;  
        long bmpCompression;
        long bmpSizeImage;
        long bmpXPelsPerMeter;
        long bmpYPelsPerMeter;
        long bmpClrUsed;
        long bmpClrImportant;
    };

    
}}}

#endif	/* BMPHEADER_H */

